package com.by.config;

import feign.auth.BasicAuthRequestInterceptor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FeignConfig {

    @Value("${auth.key}")
    String key;
    @Value("${auth.secret}")
    String secret;
    @Bean
    public BasicAuthRequestInterceptor requestInterceptor(){
        return new BasicAuthRequestInterceptor(key,secret);
    }
}
